﻿#ifndef SYNCFILES_H
#define SYNCFILES_H

#include <QWidget>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QGridLayout>
#include <QTimer>
#include <QVector>

namespace Ui {
class SyncFiles;
}

class SyncFiles : public QWidget
{
    Q_OBJECT

public:
    explicit SyncFiles(QWidget *parent = 0);
    ~SyncFiles();

private slots:
    void on_BtnSrc_clicked();

    void on_BtnDest_clicked();

    void on_BtnStart_clicked();

    void SyncFileTimerout();

    void on_lEditStartTime_editingFinished();

private:
    Ui::SyncFiles *ui;
    QString SrcPath;
    QString DestPath;
    QString StartTime;
    bool IsStart;
    QTimer *SyncTimer;
private:
    void Init();
    void InitCtrls();
    QString GetFolderPath();
    int RecusionFindFiles(QString Folder, QVector<QString> &List);
    void SyncFile();
    bool RegexFindTime(QString data);
};

#endif // SYNCFILES_H
